Skip to content

[sync] ide: 5 commits from Forge#1

Merged
Snider merged 11 commits intomainfrom
dev
Mar 22, 2026
Merged

[sync] ide: 5 commits from Forge#1
Snider merged 11 commits intomainfrom
dev

Conversation

@Snider
Copy link
Contributor

@Snider Snider commented Mar 17, 2026

Forge → GitHub Sync

Commits: 5
Files changed: 16

Automated sync from Forge. Mark as ready for review when CodeRabbit should process.


Co-Authored-By: Virgil virgil@lethean.io

Summary by CodeRabbit

  • New Features

    • Expanded Core API surface for inter-service calls and background tasks.
    • Added a read-only virtual filesystem model for frontend use.
  • Chores

    • Updated Go module dependencies and module path.
    • Tweaked development server CLI flags.
    • Disabled Angular CLI analytics.
    • Added an IDE entry to .gitignore.
  • Breaking / Public API

    • Removed greeting bindings and adjusted the exported binding surface.

Snider and others added 7 commits March 15, 2026 15:11
Add brain.NewDirect() and agentic.NewPrep() to MCP service.
Update go.mod to core/mcp v0.2.0. Regenerated wails bindings.

Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Replace all fmt.Errorf calls in runtime.go with structured errors via
coreerr.E() from go-log, ensuring every error carries operation context
for structured logging and tracing.

Add unit tests for runtime utilities (findFreePort, waitForHealth,
defaultProvidersDir), RuntimeManager (List, StopAll, StartAll),
ProvidersAPI (Name, BasePath, list endpoint), guiEnabled, and
staticAssetGroup. Coverage: 27.1%.

No os.ReadFile/os.WriteFile violations found. CLAUDE.md reviewed —
no outdated commands.

Co-Authored-By: Virgil <virgil@lethean.io>
…LAUDE.md — update any outdate...' (#1) from agent/dx-audit-and-fix--1--review-claude-md into main
@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Updates build/config and Angular settings; removes several autogenerated Greet bindings; adds new frontend Core IPC bindings, models and an embed FS model; changes Go module path and bumps many dependencies; switches MCP wiring in main to use a direct brain plus an agentic prep subsystem; and adds multiple unit tests.

Changes

Cohort / File(s) Summary
Config & build files
/.gitignore, build/Taskfile.yml, frontend/angular.json
Added ide to .gitignore; removed --strictPort from the dev Vite command in Taskfile.yml; added top-level cli: { analytics: false } to angular.json.
Removed Greet bindings & re-exports
frontend/bindings/changeme/greetservice.ts, frontend/bindings/.../core-ide/greetservice.ts, frontend/bindings/.../core-ide/index.ts
Deleted autogenerated greetservice binding files and their re-exports, removing the public GreetService/Greet API surface.
Embed FS model & export
frontend/bindings/embed/index.ts, frontend/bindings/embed/models.ts
Replaced prior export with new FS export; added FS class with constructor and createFrom deserialiser for a read-only virtual filesystem model.
Core IPC bindings & models
frontend/bindings/forge.lthn.ai/core/go/pkg/core/core.ts, .../models.ts, .../index.ts
Added autogenerated Core frontend bindings (ACTION, QUERY, PERFORM, Register*/Service/Workspace/Assets/Config/etc.) with typed $CancellablePromise returns, private runtime->type helpers, and supporting Core/Features models plus a re-export index.
Go module & dependency changes
go.mod
Changed module path (forge.lthn.ai/core/idedappco.re/go/core/ide) and updated many direct and indirect dependency versions (adds/removals and bumps across Forge packages and third-party modules).
Main initialization / MCP wiring
main.go
Rewired MCP subsystems: replaced brain.New(bridge) with brain.NewDirect() and added agentic.NewPrep() as a separate MCP subsystem; updated an icons import path to the new module path.
Runtime error handling changes
runtime.go
Switched several error constructions to use coreerr.E (core logging error wrapper) instead of fmt.Errorf in runtime/provider startup and health-check paths.
Tests added
main_test.go, providers_test.go, runtime_test.go, providers_test.go
Added multiple unit tests for main/gui enablement, Providers API, runtime utilities (port finding, health checks, start/stop behaviors) and related table-driven checks.
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title '[sync] ide: 5 commits from Forge' clearly describes the pull request as an automated synchronisation containing 5 commits from the Forge repository, which aligns with the PR's primary purpose.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@Snider Snider marked this pull request as ready for review March 17, 2026 17:02
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
build/Taskfile.yml (1)

81-81: Removal of --strictPort changes dev server behaviour.

Without --strictPort, Vite will silently fall back to another port if {{.VITE_PORT}} is occupied. This improves resilience but may cause confusion if developers expect a specific port. Ensure this aligns with the intended workflow.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@build/Taskfile.yml` at line 81, The dev server command "npm run dev -- --port
{{.VITE_PORT}}" in Taskfile.yml now omits --strictPort which lets Vite pick a
different port if the requested one is busy; decide and enforce the intended
workflow: if you require the exact port, restore the flag by changing the
command to include --strictPort (i.e., "npm run dev -- --port {{.VITE_PORT}}
--strictPort"); otherwise, keep the current command but update
documentation/README to explicitly note that Vite may fall back to another port
so developers aren't confused.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.gitignore:
- Line 7: The ignore pattern
"build/windows/nsis/MicrosoftEdgeWebview2Setup.exeide" is malformed; replace
that string with "build/windows/nsis/MicrosoftEdgeWebview2Setup.exe" so the
WebView2 installer executable is properly ignored by Git—locate the bad pattern
in the .gitignore and correct the trailing "exeide" to ".exe".

---

Nitpick comments:
In `@build/Taskfile.yml`:
- Line 81: The dev server command "npm run dev -- --port {{.VITE_PORT}}" in
Taskfile.yml now omits --strictPort which lets Vite pick a different port if the
requested one is busy; decide and enforce the intended workflow: if you require
the exact port, restore the flag by changing the command to include --strictPort
(i.e., "npm run dev -- --port {{.VITE_PORT}} --strictPort"); otherwise, keep the
current command but update documentation/README to explicitly note that Vite may
fall back to another port so developers aren't confused.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4e255333-5bca-45f7-a92b-535bf527d8a9

📥 Commits

Reviewing files that changed from the base of the PR and between d145612 and 5efd2c6.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (15)
  • .gitignore
  • build/Taskfile.yml
  • build/darwin/Assets.car
  • build/darwin/icons.icns
  • frontend/angular.json
  • frontend/bindings/changeme/greetservice.ts
  • frontend/bindings/embed/index.ts
  • frontend/bindings/embed/models.ts
  • frontend/bindings/forge.lthn.ai/core/go/pkg/core/core.ts
  • frontend/bindings/forge.lthn.ai/core/go/pkg/core/index.ts
  • frontend/bindings/forge.lthn.ai/core/go/pkg/core/models.ts
  • frontend/bindings/github.com/host-uk/core/internal/core-ide/greetservice.ts
  • frontend/bindings/github.com/host-uk/core/internal/core-ide/index.ts
  • go.mod
  • main.go
💤 Files with no reviewable changes (3)
  • frontend/bindings/github.com/host-uk/core/internal/core-ide/greetservice.ts
  • frontend/bindings/github.com/host-uk/core/internal/core-ide/index.ts
  • frontend/bindings/changeme/greetservice.ts

@@ -7,3 +7,4 @@ build/linux/appimage/build
build/windows/nsis/MicrosoftEdgeWebview2Setup.exeide
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix the malformed ignore pattern.

Line 7 ends with exeide instead of .exe, which appears to be a concatenation error. This malformed pattern prevents the executable from being properly ignored by Git. Please correct it to end with .exe:

🐛 Proposed fix for the malformed pattern
-build/windows/nsis/MicrosoftEdgeWebview2Setup.exeide
+build/windows/nsis/MicrosoftEdgeWebview2Setup.exe
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
build/windows/nsis/MicrosoftEdgeWebview2Setup.exeide
build/windows/nsis/MicrosoftEdgeWebview2Setup.exe
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitignore at line 7, The ignore pattern
"build/windows/nsis/MicrosoftEdgeWebview2Setup.exeide" is malformed; replace
that string with "build/windows/nsis/MicrosoftEdgeWebview2Setup.exe" so the
WebView2 installer executable is properly ignored by Git—locate the bad pattern
in the .gitignore and correct the trailing "exeide" to ".exe".

Snider and others added 4 commits March 17, 2026 17:49
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Change module declaration from forge.lthn.ai/core/ide to
dappco.re/go/core/ide. Update the self-referencing icons import
accordingly. External dependency imports remain on forge.lthn.ai
paths until those sibling modules publish dappco.re-aware versions,
avoiding dual-path conflicts in the Go module graph.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@go.mod`:
- Line 172: The grpc dependency is pinned to a vulnerable version; update the
module reference for google.golang.org/grpc from v1.79.2 to v1.79.3 or later in
go.mod and regenerate sums (e.g., run the appropriate go tooling to update
go.sum), ensuring any CI or vendoring is refreshed; target the module name
google.golang.org/grpc and confirm the new version is recorded in go.mod and
go.sum before committing.
- Line 44: The go.mod currently pins github.com/buger/jsonparser v1.1.1 which is
vulnerable; update the requirement to v1.1.2 (or newer) so the fix for
GHSA-6g7g-w4f8-9c9x is included. If jsonparser is pulled in indirectly (via
bytedance/sonic or a forge.lthn.ai module), either bump that parent dependency
to a version that depends on jsonparser v1.1.2+, or add a direct require for
github.com/buger/jsonparser v1.1.2 in go.mod and run go get
github.com/buger/jsonparser@v1.1.2 followed by go mod tidy to ensure the updated
version is resolved; then run tests/build to verify no regressions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7ae104c4-be21-4046-b5b3-0c1d8d890d81

📥 Commits

Reviewing files that changed from the base of the PR and between 5efd2c6 and 72ab026.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (1)
  • go.mod

github.com/bep/debounce v1.2.1 // indirect
github.com/bmatcuk/doublestar/v4 v4.9.1 // indirect
github.com/bmatcuk/doublestar/v4 v4.10.0 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# 1) Confirm advisory status in OSV.
# 2) Locate where jsonparser is pinned in module files.
set -euo pipefail

curl -s https://api.osv.dev/v1/query -d '{
  "package": {"name":"github.com/buger/jsonparser","ecosystem":"Go"},
  "version":"1.1.1"
}' | jq .

echo "---- occurrences in go.mod/go.sum ----"
rg -n "github.com/buger/jsonparser|google.golang.org/grpc" go.mod go.sum || true

Repository: dAppCore/ide

Length of output: 3155


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find the parent dependency that brings in jsonparser
# First, let's examine the full go.mod to understand the dependency tree
echo "=== Full go.mod content ==="
cat go.mod

echo ""
echo "=== Searching for direct dependencies that might depend on jsonparser ==="
# Common libraries that use jsonparser: protobuf libraries, gRPC, etc.
rg -i "protobuf|encoding|grpc|json" go.mod -B 1 -A 1 | head -30

Repository: dAppCore/ide

Length of output: 9801


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Search for any imports of jsonparser in the source code
echo "=== Searching for jsonparser imports in source code ==="
rg -i "jsonparser|buger" --type go . 2>/dev/null || echo "No direct usage found"

# Check if we can use go mod graph-like output
echo ""
echo "=== Checking forge.lthn.ai packages ==="
# These are internal packages, they're likely where jsonparser is used
git ls-files | grep -E "\.go$" | head -5

# Let's also check go.sum to see if there are any helpful clues
echo ""
echo "=== Lines around jsonparser in go.sum ==="
grep -B 2 -A 2 "buger/jsonparser" go.sum || true

Repository: dAppCore/ide

Length of output: 883


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check bytedance/sonic usage - it's a JSON serialization library that might use jsonparser
echo "=== Searching for sonic usage ==="
rg -i "sonic|serialize" --type go . 2>/dev/null | head -20 || echo "No direct usage found"

# Check the relationship - sonic is known to use jsonparser internally
echo ""
echo "=== Checking versions of bytedance packages in go.mod ==="
grep -E "bytedance/(sonic|gopkg)" go.mod

# Check if there are newer versions available that might pull in jsonparser v1.1.2
echo ""
echo "=== Go.sum entries for bytedance ==="
grep "bytedance" go.sum | head -20

Repository: dAppCore/ide

Length of output: 886


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check go.sum to see if jsonparser is only v1.1.1 or if there are other versions
echo "=== All jsonparser entries in go.sum ==="
grep "jsonparser" go.sum

# Let's check the direct dependencies from forge.lthn.ai - they might have been updated
echo ""
echo "=== forge.lthn.ai direct dependencies ==="
grep "forge.lthn.ai" go.mod | grep -v "//" | head -20

Repository: dAppCore/ide

Length of output: 574


Update jsonparser dependency to v1.1.2 or later to resolve HIGH severity DoS vulnerability.

Line 46: github.com/buger/jsonparser v1.1.1 // indirect is vulnerable to GHSA-6g7g-w4f8-9c9x. The Delete function fails to validate offsets on malformed JSON input, causing a runtime panic (CWE-125). Although marked indirect, upgrade the parent dependency (likely bytedance/sonic or a forge.lthn.ai module) to pull in v1.1.2 or newer.

🧰 Tools
🪛 OSV Scanner (2.3.3)

[HIGH] 44-44: github.com/buger/jsonparser 1.1.1: Denial of service in github.com/buger/jsonparser

(GHSA-6g7g-w4f8-9c9x)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@go.mod` at line 44, The go.mod currently pins github.com/buger/jsonparser
v1.1.1 which is vulnerable; update the requirement to v1.1.2 (or newer) so the
fix for GHSA-6g7g-w4f8-9c9x is included. If jsonparser is pulled in indirectly
(via bytedance/sonic or a forge.lthn.ai module), either bump that parent
dependency to a version that depends on jsonparser v1.1.2+, or add a direct
require for github.com/buger/jsonparser v1.1.2 in go.mod and run go get
github.com/buger/jsonparser@v1.1.2 followed by go mod tidy to ensure the updated
version is resolved; then run tests/build to verify no regressions.

golang.org/x/text v0.35.0 // indirect
golang.org/x/tools v0.43.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260316180232-0b37fe3546d5 // indirect
google.golang.org/grpc v1.79.2 // indirect
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify vulnerability status directly from OSV for grpc-go.
set -euo pipefail

curl -s https://api.osv.dev/v1/query -d '{
  "package": {"name":"google.golang.org/grpc","ecosystem":"Go"},
  "version":"1.79.2"
}' | jq .

Repository: dAppCore/ide

Length of output: 5282


Upgrade google.golang.org/grpc to v1.79.3 or later immediately.

Line 172 pins v1.79.2, which contains a critical authorisation-bypass vulnerability (GHSA-p77j-4mvh-x3m3). Requests with malformed HTTP/2 :path pseudo-headers can bypass path-based authorisation interceptors. Upgrade to v1.79.3 or newer.

🧰 Tools
🪛 OSV Scanner (2.3.3)

[CRITICAL] 172-172: google.golang.org/grpc 1.79.2: gRPC-Go has an authorization bypass via missing leading slash in :path

(GHSA-p77j-4mvh-x3m3)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@go.mod` at line 172, The grpc dependency is pinned to a vulnerable version;
update the module reference for google.golang.org/grpc from v1.79.2 to v1.79.3
or later in go.mod and regenerate sums (e.g., run the appropriate go tooling to
update go.sum), ensuring any CI or vendoring is refreshed; target the module
name google.golang.org/grpc and confirm the new version is recorded in go.mod
and go.sum before committing.

@Snider Snider merged commit 800b75e into main Mar 22, 2026
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant